<nav class="w-full">
  <ul class="flex justify-center gap-5 bg-green-600 text-white *:hover:bg-sky-500 *:hover:cursor-pointer">
    <li><a href="#">主页</a></li>
    <li><a href="#">用户注册</a></li>
    <li><a href="#">用户信息</a></li>
    <li><a href="#">购物车</a></li>
    <li><a href="#">搜索</a></li>
    <?php
    if (isset($_SESSION['username'])) {
      echo "<li><a href='Logout.php'>注销</a></li>";
    } else {
      echo "<li><a href='Login.php'>用户登陆</a></li>";
    }
    ?>
  </ul>
  <span id='welcom' class="bg-black text-white">
    <?php
    if (isset($_SESSION['username'])) {
      echo $_SESSION['usename'] . "欢迎访问网上书城系统！";
    } else {
      echo "欢迎访问网上书城系统！";
    }
    ?>
  </span>
</nav>